#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Created by master on 2017/2/26

# 将二维数组顺时针旋转90°
'''

[[0, 1, 2, 3]
 [0, 1, 2, 3]
 [0, 1, 2, 3]
 [0, 1, 2, 3]]

'''
data = [[col for col in range(4)] for row in range(4)]

# for r_index, row in enumerate(data):
#     for c_index in range(r_index, len(row)):
#         tmp = data[c_index][r_index]
#         data[c_index][r_index] = row[c_index]
#         data[r_index][c_index] = tmp
#     print(data[r_index])

for i in range(len(data)):
    a = [data[i][i] for row in range(4)]
    print(a)
